import React from 'react';
import { Tabs, Row, Col } from 'antd';
import BimCheckRate from '../security/hiddendanger/components/statics/BimChekRate';

const pageLayouts = {
  config: {},
  // block: [
  //   {
  //     code: 'code547545', sort: 3, col: 6, height: 900,
  //     children: [
  //       { code: 'code547545', sort: 1, col: 24, background: 'Indigo', height: 300, },
  //       { code: 'code547545', sort: 2, col: 24, background: 'red', height: 300, },
  //       { code: 'code547545', sort: 3, col: 24, background: 'MediumOrchid', height: 300, },
  //     ]
  //   },
  //   {
  //     code: 'code547545', sort: 2.1, col: 12, height: 600, children: [
  //       { code: 'code547545', sort: 2.1, col: 24, background: 'yellow', height: 600, },
  //       { code: 'code547545', sort: 2.3, col: 24, background: 'Blue', height: 300 },
  //     ]
  //   },
  //   {
  //     code: 'code547545', sort: 2, col: 6, height: 900, children: [
  //       { code: 'code547545', sort: 1, col: 24, background: 'deepPink', height: 300, content: '日你麻痹' },
  //       { code: 'code547545', sort: 2, col: 24, background: 'green', height: 300, content: '日你麻痹' },
  //       { code: 'code547545', sort: 3, col: 24, background: 'pink', height: 300, content: '日你麻痹' },
  //     ]
  //   },
  // ]

  block: [
    {
      code: 'code547545',
      sort: 2,
      col: 18,
      height: 600,
      children: [
        { code: 'code547545', sort: 2, col: 24, height: 600, background: 'deepPink' },
        { code: 'code547545', sort: 2, col: 24, height: 300, content: 'BimCheckRate' },
      ],
    },
    { code: 'code547545', sort: 2, col: 6, height: 900, content: 'BimCheckRate' },
  ],

  // block: [
  //   {
  //     code: 'code547545', sort: 3, col: 6, height: 900, background: 'Indigo',
  //     // children: [
  //     //   { code: 'code547545', sort: 1, col: 24, background: 'Indigo', height: 300, },
  //     //   { code: 'code547545', sort: 2, col: 24, background: 'red', height: 300, },
  //     //   { code: 'code547545', sort: 3, col: 24, background: 'MediumOrchid', height: 300, },
  //     // ]
  //   },
  //   {
  //     code: 'code547545', sort: 3, col: 18, height: 900, background: 'red',
  //   }
  // ]
};

export default class ViewSetting extends React.Component {
  constructor(props: any) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <>
        <Row>
          {pageLayouts.block
            .sort((a, b) => a.sort - b.sort)
            .map(item => (
              <Col
                span={item.col}
                style={{ height: item.height, background: item.background }}
                offset={item.offset}
              >
                {item.children ? (
                  item.children
                    .sort((c, d) => c.sort - d.sort)
                    .map(secondItem => (
                      <Col
                        span={secondItem.col}
                        style={{ height: secondItem.height, background: secondItem.background }}
                        offset={secondItem.offset}
                      >
                        {secondItem.content == 'BimCheckRat4524e' ? (
                          <BimCheckRate></BimCheckRate>
                        ) : (
                          secondItem.content
                        )}
                      </Col>
                    ))
                ) : item.content == 'BimCheckRate' ? (
                  <BimCheckRate></BimCheckRate>
                ) : (
                  item.content
                )}
              </Col>
            ))}
        </Row>
      </>
    );
  }
}
